import {RATESEARCH, RATECONFIRM, RESERVATION, CANCELSUPPLIERORDER} from '@/services/api'
import {request, METHOD} from '@/utils/request'

/**
 * 搜索价格
 * @param params
 * @returns {Promise<*>}
 */
export async function searchRate(params) {
    return request(RATESEARCH, METHOD.POST, params)
}

/**
 * 确认价格
 * @param params
 * @returns {Promise<*>}
 */
export async function confirmRate(params) {
    return request(RATECONFIRM, METHOD.POST, params)
}

/**
 * 预订
 * @param params
 * @returns {Promise<*>}
 */
export async function reservation(params) {
    return request(RESERVATION, METHOD.POST, params)
}

/**
 * 取消订单
 * @param params
 * @returns {Promise<*>}
 */
export async function cancelSupplierOrder(params) {
    return request(CANCELSUPPLIERORDER, METHOD.POST, params)
}